/* small */
.app-well-menu,
.contact-details-status,
-.run-dialog-label,
.run-dialog-error-label {
font-size: 9pt;
}
#searchEntry,
.notification StEntry,
-.login-dialog-prompt-entry,
-.prompt-dialog-password-entry {
+.modal-dialog StEntry {
color: rgb(64, 64, 64);
caret-color: rgb(64, 64, 64);
font-size: 12pt;
}
#searchEntry,
+.run-dialog-entry,
.notification StEntry {
border: 2px solid rgba(245,245,245,0.2);
background-gradient-start: rgba(5,5,6,0.1);
#searchEntry:focus,
#searchEntry:hover,
.notification StEntry:focus,
-.login-dialog-prompt-entry,
-.prompt-dialog-password-entry {
+.modal-dialog StEntry {
border: 2px solid rgb(136,138,133);
background-gradient-start: rgb(200,200,200);
background-gradient-end: white;
}
.notification StEntry:focus,
-.prompt-dialog-password-entry:focus,
-.login-dialog-prompt-entry:focus {
+.modal-dialog StEntry:focus {
border: 2px solid #3465a4;
}
}
.notification StEntry,
-.prompt-dialog-password-entry,
-.login-dialog-prompt-entry {
+.modal-dialog StEntry {
border-radius: 5px;
padding: 4px 4px;
}
/* Run Dialog */
+.run-dialog-label {
+ font-size: 12pt;
+ font-weight: bold;
+ color: #666666;
+ padding-bottom: .5em;
+}
+
.run-dialog-error-box {
padding-top: 15px;
spacing: 5px;
}
-.run-dialog-entry {
+.modal-dialog .run-dialog-entry {
+ font-size: 9pt;
font-weight: bold;
width: 23em;
- selection-background-color: white;
- selected-color: black;
-}
-
-.run-dialog {
- border-radius: 16px;
-
- padding-right: 21px;
- padding-left: 21px;
- padding-bottom: 15px;
- padding-top: 15px;
+ selection-background-color: #333333;
}
.lightbox {
let label = new St.Label({ style_class: 'run-dialog-label',
- text: _("Please enter a command:") });
+ text: _("Enter a Command") });
this.contentLayout.add(label, { y_align: St.Align.START });
this._errorBox.hide();
+ this.setButtons([{ action: Lang.bind(this, this.close),
+ label: _("Cancel"),
+ key: Clutter.Escape },
+ { action: Lang.bind(this,
+ function() {
+ this._activate(false);
+ }),
+ label: _("Run"),
+ isDefault: true }]);
+
this._pathCompleter = new Gio.FilenameCompleter();
this._commandCompleter = new CommandCompleter();
this._group.connect('notify::visible', Lang.bind(this._commandCompleter, this._commandCompleter.update));
this._entryText.connect('key-press-event', Lang.bind(this, function(o, e) {
let symbol = e.get_key_symbol();
if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) {
- this.popModal();
- if (e.get_state() & Clutter.ModifierType.CONTROL_MASK)
- this._run(o.get_text(), true);
- else
- this._run(o.get_text(), false);
- if (!this._commandError)
- this.close();
- else {
- if (!this.pushModal())
- this.close();
- }
- return true;
- }
- if (symbol == Clutter.Escape) {
- this.close();
+ this._activate(e.get_state() & Clutter.ModifierType.CONTROL_MASK);
return true;
}
if (symbol == Clutter.slash) {
}));
},
+ _activate: function(inTerminal) {
+ this.popModal();
+ this._run(this._entryText.get_text(), inTerminal);
+ if (!this._commandError ||
+ !this.pushModal())
+ this.close();
+ },
+
_getCompletion : function(text) {
if (text.indexOf('/') != -1) {
return this._pathCompleter.get_completion_suffix(text);